<extend name="Public/base"/>
<block name="body">
  <!-- 标题栏 -->
  
  <div class="main-title">
    <h2>任务列表</h2>
  </div>
  <div class="tools"> <a class="btn" href="{:U('add')}">新 增</a> 
    

  </div>
  
  <!-- 数据列表 -->
  <div class="data-table category">
    <div class="data-table table-stripe">
      <table class="">
        <thead>
          <tr>
            <th class="">任务时间</th>
            <th class="">总金额</th>
            <th class="">操作</th>
          </tr>
        </thead>
        <tbody class="">
            <notempty name="_list">
          
          <volist name="_list" id="vo">
            <tr id="{$vo.id}">
               <td>{$vo.time-start|date="Y-m-d",###} 至{$vo.time-end|date="Y-m-d",###}</td>
              <td>{$vo.task}</td>
           
              <td>
              	<a class="confirm" href="{:U('objective/edit', 'id='.$vo['id'])}">编辑</a>
				<a class="confirm" href="{:U('objective/view', 'id='.$vo['id'])}">查看详情</a>
              </td>
            </tr>
          </volist>
          <else/>
        <td colspan="8" class="text-center"> aOh! 暂时还没有内容! </td>
            </notempty>
            </tbody>
      </table>
    </div>
  </div>
  <div class="page"> {$_page} </div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';
</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script> 
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script> 
<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script> 
<script type="text/javascript">

		
  //搜索功能
	$("#search").click(function(){
		var url = $(this).attr('url');
		//var status = $("#sch-sort-txt").attr("data");
        var query  = $('.search-form').find('input').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
        query = query.replace(/^&/g,'');
		if(status != ''){
			query = 'status=' + status + "&" + query;
        }
        if( url.indexOf('?')>0 ){
            url += '&' + query;
        }else{
            url += '?' + query;
        }
		window.location.href = url;
	});
	/* 状态搜索子菜单 */
	$(".search-form").find(".drop-down").hover(function(){
		$("#sub-sch-menu").removeClass("hidden");
	},function(){
		$("#sub-sch-menu").addClass("hidden");
	});
	$("#sub-sch-menu li").find("a").each(function(){
		$(this).click(function(){
			var text = $(this).text();
			$("#sch-sort-txt").text(text).attr("data",$(this).attr("value"));
			$("#sub-sch-menu").addClass("hidden");
		})
	});

 //回车自动提交
    $('.search-form').find('input').keyup(function(event){
        if(event.keyCode===13){
            $("#search").click();
        }
    });
	  $('#time-start').datetimepicker({
        format: 'yyyy-mm-dd',
        language:"zh-CN",
	    minView:2,
	    autoclose:true
    });

    $('#time-end').datetimepicker({
        format: 'yyyy-mm-dd',
        language:"zh-CN",
	    minView:2,
	    autoclose:true
    });
    //导航高亮
    highlight_subnav('{:U('Order/index')}');
</script>
</block>
